package net.oschina.simpleplus.dao;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;

import net.oschina.simpleplus.entity.User;

public interface UserDao {

	@Select("select * from user where email = #{email}")
	public User selectByEmail(String email);

	@Insert("insert into user (email,nickname,passwd,salt) values (#{email},#{nickname},#{passwd},#{salt})")
	@Options(keyColumn="id", keyProperty="id", useGeneratedKeys=true)
	public int saveNewUser(User createNewUser);
}
